package com.hsg;

/**
 * @description:
 * @author:hsg
 * @date: Created in 2020/6/7 10:29
 * @version: 1.8
 * @modified By:
 */
public class Sense {
    Person person=new Person();
    MonsterWolf wolf1=new MonsterWolf();
    MonsterWolf wolf2=new MonsterWolf();
    MonsterWolf wolf3=new MonsterWolf();
    MonsterWolfSet monsterWolfSet=new MonsterWolfSet();

    public void initSense(){
        initPerson();
        initMonster();
    }
    public void initPerson(){
        person.setId("201902183");
        person.setHPvalue(300);
        person.setDescription("小何");
        person.setCurrentWeapon(new WeaponSword("w1","倚天剑",-50));
    }
    public void initMonster(){
        wolf1.setId("wolf1");
        wolf1.setDescription("狼1");
        wolf1.setHPvalue(200);
        wolf1.setCurrentWeapon(new WeaponKnife("k1","大刀",-30));

        wolf2.setId("wolf2");
        wolf2.setDescription("狼2");
        wolf2.setHPvalue(200);
        wolf2.setCurrentWeapon(new WeaponKnife("k2","大刀",-20));

        wolf3.setId("wolf3");
        wolf3.setDescription("狼3");
        wolf3.setHPvalue(200);
        wolf3.setCurrentWeapon(new WeaponKnife("k3","大刀",-25));

        monsterWolfSet.getMonsterWolves().add(wolf1);
        monsterWolfSet.getMonsterWolves().add(wolf2);
        monsterWolfSet.getMonsterWolves().add(wolf3);

    }

    public void play(){
        System.out.println("wolf1 HP:"+wolf1.getHPvalue());
        person.useArticle(person.getCurrentWeapon(),wolf1);
        System.out.println("wolf1 HP:"+wolf1.getHPvalue());

        System.out.println("person HP:"+person.getHPvalue());
        wolf1.useArticle(wolf1.getCurrentWeapon(),person);
        System.out.println("person HP:"+person.getHPvalue());
    }
}

